package cn.yunhe.springmvc.model;

import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

/**
 * 用户模型
 * 
 * @author ZSL
 *
 */
public class User {
	/**
	 * 账户
	 */
	@NotEmpty(message="用户名不能为空")
	private String username;
	/**
	 * 密码
	 */
	@Range(min=1,max=10,message="密码长度应该在1和10之间")
	private String userpwd;

	public User() {
		super();
	}

	public User(String username, String userpwd) {
		super();
		this.username = username;
		this.userpwd = userpwd;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUserpwd() {
		return userpwd;
	}

	public void setUserpwd(String userpwd) {
		this.userpwd = userpwd;
	}

	@Override
	public String toString() {
		return "UserModel [username=" + username + ", userpwd=" + userpwd + "]";
	}
	
}
